package com.wc.tt;

import java.util.HashMap;
import java.util.Map;

public class StrageFactory {

    public Map<Integer, AbstractAttence> map = new HashMap<>();

    public StrageFactory() {
        map.put(LeaveType.leave1.type(), GeneralAttence.getGeneralAttence());
        map.put(LeaveType.leave2.type(), SickAttence.getSickAttence());
        //....这里省略其他请假类型
    }

    public AbstractAttence getAttence(int type) {
        return map.get(type);
    }


}
